<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="robots" content="noindex,nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="shortcut icon" href="/webdot/icon.png">
<title>WebDot Tutorial: Basic graph creation</title>
</head>
<body bgcolor="white">
<a href="/webdot/index.html">[previous]</a>
<a href="/webdot/basicpublic.html">[next]</a>
<font size="+2"><b>WebDot Tutorial: Basic graph creation</b></font>
<p>
<img src="/cgi-bin/webdot/webdot/basic.dot.neato.png">
<p>
Given a description of a graph in the dot language, for example this graph:
<table border="1"><tr><td><pre>
graph G {
        a -- b -- c -- d
        b -- e -- d
}
</pre></td></tr></table>
in a file that can be served by your web server, in this case:
<a href="/webdot/basic.dot">/webdot/basic.dot</a>
<p>
Then this img tag in an html web page:
<table border=1><tr><td><pre>
&lt;img src="/cgi-bin/webdot<b>/webdot/basic.dot</b>.neato<b>.png</b>"&gt;
</pre></td></tr></table>
<p>
will produce the graph layout at the top of this page.
<p>
The URL in the img src reference consists of four parts:
<table border=1><tr>
<td>/cgi-bin/webdot</td><td>The WebDot CGI server
<br>(can be a full URL, or a relative URL like this if
webdot is on the same server as the html source.)</td>
</tr><tr>
<td><b>/webdot/basic.dot</b></td><td>The graph source file
<br>(can be a full URL, or a relative URL like this if
the graph source is on the same server as webdot.
<br>If it is to be a full URL of a different server than the
webdot cgi is on, then the webdot cgi must be configured
for public graph serving.)</td>
</tr><tr>
<td>.neato</td><td>The layout engine<br>(can be either: ".dot", ".neato", or ".twopi")</td>
</tr><tr>
<td><b>.png</b></td><td>The output format<br>(other bitmap formats are: ".gif")</td>
</tr></table>
</body>
</html>
